/* eslint-disable no-unused-vars */
import Mock from 'mockjs'

const mock = Mock.mock

export default [
  {
    url: '/api/sms/staff',
    type: 'get',
    response: (config) => {
      return mock({
        code: 200,
        data: {
          page: 1,
          limit: 20,
          total: 222,
          'list|20': [
            {
              'name|1': ['张三', '李四', '王五', '赵六', '田七'],
              entryTime: '@date("yyyy-MM-dd")',
              dateTime: '@datetime("yyyy-MM-dd HH:mm:ss")',
              phone: '@integer(100000000, 200000000)',
              id: '@id',
              'status|1-2': 2,
              'group|1': ['技术部', '销售部']
            }
          ]
        },
        message: 'success'
      })
    }
  },
  // chart  bar line数据
  {
    url: '/api/template/chart',
    type: 'post',
    response: (config) => {
      return mock({
        code: 200,
        data: {
          dates: [
            '2022-10-20',
            '2022-10-21',
            '2022-10-22',
            '2022-10-23',
            '2022-10-24'
          ],
          items: [
            {
              label: '用户登录-总次数',
              data: [100, 200, 300, 150, 50],
              key: 'login'
            },
            {
              label: '用户注册-总次数',
              data: [300, 400, 30, 50, 10],
              key: 'register'
            },
            {
              label: '在线数据-总次数',
              data: [123, 220, 310, 150, 90],
              key: 'online'
            },
            {
              label: '启动游戏-总次数',
              data: [130, 299, 350, 250, 450],
              key: 'start'
            }
          ]
        }
      })
    }
  }
]
